home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 2.iso / toolbox / utilities / xshowcmap2 / README < prev    next >
Text File  |  1996-11-11  |  3KB  |  74 lines

  1.  
  2.             ~4Dgifts/toolbox/src/exampleCode/X/xshowcmap2 README
  3.  
  4.  
  5.      This extension to xshowcmap and this winfo script, can be very helpful 
  6.      in debugging problems that occur when dealing with multiple colormaps 
  7.      and/or visuals.
  8.  
  9.      xshowcmap2 has been modified with three new optional arguments:
  10.  
  11.          -visid allows specifying the visual id.
  12.          -cmap allows specifying the colormap id.
  13.          -windowid allows specifying a window id.  The visual and 
  14.       colormap IDs are obtained from the window.
  15.  
  16.      -visid and -cmap are often used together.  Neither of these should 
  17.      be used with -windowid, which is an alternate way of providing the 
  18.      same information.
  19.  
  20.      Note xshowcmap2 is not particularly robust when given invalid values 
  21.      for these arguments, and usually will exit with a cryptic X error.
  22.  
  23.      The window ID's, visual ID's, and colormap ID's, can be obtained 
  24.      using xwininfo and xprop.  Alternatively, the enclosed script, 
  25.      winfo, can be used to obtain the same information.  Winfo, first 
  26.      does an xprop on a selected window (which can be obtained either by 
  27.      clicking on the window or with the -id argment).  It looks for the 
  28.      WM_COLORMAP_WINDOWS property on that window.  If it finds that
  29.      property, it does an xwininfo on each window listed.  If it does not
  30.      find it, it does an xwininfo on the top level window.  In either 
  31.      case, the output from xwininfo is filtered to only show the 
  32.      information pertinant to colormaps and visuals.  The returned values 
  33.      can then be passed on to xshowcmap2.
  34.  
  35.      As an example using this, consider the toolchest, which in addition 
  36.      to the default colormap, also uses a visual in the popup planes for 
  37.      its menus.  Run the command winfo, and click on the toolchest.  You 
  38.      will see output something like this:
  39.  
  40.     window 0x2c00039
  41.     colormap windows 0x2c00038 0x2c00039
  42.  
  43.     xwininfo: Window id: 0x2c00038 (has no name)
  44.       Depth: 2
  45.       Visual id: 0x20
  46.       Visual Class: PseudoColor
  47.       Colormap: 0x2c00006 (installed)
  48.  
  49.     xwininfo: Window id: 0x2c00039 "ToolChest"
  50.       Depth: 8
  51.       Visual id: 0x25
  52.       Visual Class: PseudoColor
  53.       Colormap: 0x32 (installed)
  54.  
  55.      The first line gives you the window ID.  The second line shows that 
  56.      this window has a WM_COLORMAP_WINDOWS property, which includes two 
  57.      windows.  This is followed by information on each of the windows in 
  58.      that property.  The first, of depth 2, is the popup visual, and the 
  59.      second, of depth 8, is the default visual. To look at the popup 
  60.      colormap, you can issue the command:
  61.  
  62.     xshowcmap2 -windowid 0x2c00038
  63.  
  64.      or, alternatively,
  65.  
  66.     xshowcmap2 -visid 0x20 -cmap 0x2c00006
  67.  
  68.      When looking at colormaps, be aware the usual hardware limitations 
  69.      on the number of colormaps apply.  For example, if you were also 
  70.      looking at the colormap of another application that also used the 
  71.      popup planes, only one popup colormap could be in place at a given 
  72.      time;  when one is installed, it kicks the other out.
  73.  
  74.